function drobtodec(a,b:longint):string;
var w:array[1..1000001] of longint; cur:longint;
begin
fillchar(w,sizeof(w),0);
result:=inttostr(a div b);
a:=a mod b;
if a<>0 then result:=result+'.';
cur:=length(result);
while (a<>0) and (w[a]=0) do begin
  inc(cur);
  w[a]:=cur;
  result:=result+chr((a*10) div b+48);
  a:=(a*10) mod b;
end;
if a<>0 then begin
  insert('(',result,w[a]);
  result:=result+')';
end;
end;